﻿Imports System.Windows.Markup

Public Class LicenseWindow

    Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnPrint.Click
        Me.reader.Print()

    End Sub

    Private Shared LicenseDocument As FlowDocument


    Private Sub LicenseWindow_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded

        If LicenseDocument Is Nothing Then
            Dim content As FlowDocument = TryCast(XamlReader.Parse(My.Resources.License), FlowDocument)

            LicenseDocument = If(content IsNot Nothing, content, New FlowDocument)
        End If

        Me.reader.Document = LicenseDocument
      
    End Sub

    Private Sub btnOK_Click(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnOK.Click
        Me.reader.Document = Nothing

    End Sub
End Class
